import request from '@/utils/request'

// 查询投票信息列表
export function listVoteInfo(query) {
  return request({
    url: '/business/voteInfo/list',
    method: 'get',
    params: query
  })
}

// 查询投票信息详细
export function getVoteInfo(voteId) {
  return request({
    url: '/business/voteInfo/' + voteId,
    method: 'get'
  })
}

// 新增投票信息
export function addVoteInfo(data) {
  return request({
    url: '/business/voteInfo',
    method: 'post',
    data: data
  })
}

// 修改投票信息
export function updateVoteInfo(data) {
  return request({
    url: '/business/voteInfo',
    method: 'put',
    data: data
  })
}
// 更新投票信息状态
export function updateVoteInfoStatus(data) {
  return request({
    url: '/business/voteInfo/updateVoteInfoStatus',
    method: 'post',
    data: data
  })
}

// 删除投票信息
export function delVoteInfo(voteId) {
  return request({
    url: '/business/voteInfo/' + voteId,
    method: 'delete'
  })
}
